<HTML>
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A> 
</CENTER>






<HR>

<H3>fix wall/gran command 
</H3>
<P><B>Syntax:</B>
</P>
<PRE>fix ID group-ID wall/gran Kn Kt gamma_n gamma_t xmu dampflag wallstyle args keyword values ... 
</PRE>
<UL><LI>ID, group-ID are documented in <A HREF = "fix.html">fix</A> command 

<LI>wall/gran = style name of this fix command 

<LI>Kn = elastic constant for normal particle repulsion (force/distance units or pressure units - see discussion below) 

<LI>Kt = elastic constant for tangential contact (force/distance units or pressure units - see discussion below) 

<LI>gamma_n = damping coefficient for collisions in normal direction (1/time units or 1/time-distance units - see discussion below) 

<LI>gamma_t = damping coefficient for collisions in tangential direction (1/time units or 1/time-distance units - see discussion below) 

<LI>xmu = static yield criterion (unitless fraction between 0.0 and 1.0) 

<LI>dampflag = 0 or 1 if tangential damping force is excluded or included 

<LI>wallstyle = <I>xplane</I> or <I>yplane</I> or <I>zplane</I> or <I>zcylinder</I> 

<LI>args = list of arguments for a particular style 

<PRE>  <I>xplane</I> or <I>yplane</I> or <I>zplane</I> args = lo hi
    lo,hi = position of lower and upper plane (distance units), either can be NULL)
  <I>zcylinder</I> args = radius
    radius = cylinder radius (distance units) 
</PRE>
<LI>zero or more keyword/value pairs may be appended to args 

<LI>keyword = <I>wiggle</I> or <I>shear</I> 

<PRE>  <I>wiggle</I> values = dim amplitude period
    dim = <I>x</I> or <I>y</I> or <I>z</I>
    amplitude = size of oscillation (distance units)
    period = time of oscillation (time units)
  <I>shear</I> values = dim vshear
    dim = <I>x</I> or <I>y</I> or <I>z</I>
    vshear = magnitude of shear velocity (velocity units) 
</PRE>

</UL>
<P><B>Examples:</B>
</P>
<PRE>fix 1 all wall/gran 200000.0 NULL 50.0 NULL 0.5 0 xplane -10.0 10.0 
fix 1 all wall/gran 200000.0 NULL 50.0 NULL 0.5 0 zplane 0.0 NULL 
fix 2 all wall/gran 100000.0 20000.0 50.0 30.0 0.5 1 zcylinder 15.0 wiggle z 3.0 2.0 
</PRE>
<P><B>Description:</B>
</P>
<P>Bound the simulation domain of a granular system with a frictional
wall.  All particles in the group interact with the wall when they are
close enough to touch it.
</P>
<P>The first set of parameters (Kn, Kt, gamma_n, gamma_t, xmu, and
dampflag) have the same meaning as those specified with the
<A HREF = "pair_gran.html">pair_style granular</A> force fields.  This means a NULL
can be used for either Kt or gamma_t as described on that page.  If a
NULL is used for Kt, then a default value is used where Kt = 2/7 Kn.
If a NULL is used for gamma_t, then a default value is used where
gamma_t = 1/2 gamma_n.
</P>
<P>The nature of the wall/particle interactions are determined by which
pair_style is used in your input script: <I>hooke</I>, <I>hooke/history</I>, or
<I>hertz/history</I>.  The equation for the force between the wall and
particles touching it is the same as the corresponding equation on the
<A HREF = "pair_gran.html">pair_style granular</A> doc page, in the limit of one of
the two particles going to infinite radius and mass (flat wall).
I.e. delta = radius - r = overlap of particle with wall, m_eff = mass
of particle, and sqrt(RiRj/Ri+Rj) becomes sqrt(radius of particle).
The units for Kn, Kt, gamma_n, and gamma_t are as described on that
doc page.  The meaning of xmu and dampflag are also as described on
that page.  Note that you can choose different values for these 6
wall/particle coefficients than for particle/particle interactions, if
you wish your wall to interact differently with the particles, e.g. if
the wall is a different material.
</P>
<P>IMPORTANT NOTE: As discussed on the doc page for <A HREF = "pair_gran.html">pair_style
granular</A>, versions of LAMMPS before 9Jan09 used a
different equation for Hertzian interactions.  This means Hertizian
wall/particle interactions have also changed.  They now include a
sqrt(radius) term which was not present before.  Also the previous
versions used Kn and Kt from the pairwise interaction and hardwired
dampflag to 1, rather than letting them be specified directly.  This
means you can set the values of the wall/particle coefficients
appropriately in the current code to reproduce the results of a
prevoius Hertzian monodisperse calculation.  For example, for the
common case of a monodisperse system with particles of diameter 1, Kn,
Kt, gamma_n, and gamma_s should be set sqrt(2.0) larger than they were
previously.
</P>
<P>The <I>wallstyle</I> can be planar or cylindrical.  The 3 planar options
specify a pair of walls in a dimension.  Wall positions are given by
<I>lo</I> and <I>hi</I>.  Either of the values can be specified as NULL if a
single wall is desired.  For a <I>zcylinder</I> wallstyle, the cylinder's
axis is at x = y = 0.0, and the radius of the cylinder is specified.
</P>
<P>Optionally, the wall can be moving, if the <I>wiggle</I> or <I>shear</I>
keywords are appended.  Both keywords cannot be used together.
</P>
<P>For the <I>wiggle</I> keyword, the wall oscillates sinusoidally, similar to
the oscillations of particles which can be specified by the
<A HREF = "fix_move.html">fix_move</A> command.  This is useful in packing
simulations of granular particles.  The arguments to the <I>wiggle</I>
keyword specify a dimension for the motion, as well as it's
<I>amplitude</I> and <I>period</I>.  Note that if the dimension is in the plane
of the wall, this is effectively a shearing motion.  If the dimension
is perpendicular to the wall, it is more of a shaking motion.  A
<I>zcylinder</I> wall can only be wiggled in the z dimension.
</P>
<P>Each timestep, the position of a wiggled wall in the appropriate <I>dim</I>
is set according to this equation:
</P>
<PRE>position = coord + A - A cos (omega * delta) 
</PRE>
<P>where <I>coord</I> is the specified initial position of the wall, <I>A</I> is
the <I>amplitude</I>, <I>omega</I> is 2 PI / <I>period</I>, and <I>delta</I> is the time
elapsed since the fix was specified.  The velocity of the wall is set
to the derivative of this expression.
</P>
<P>For the <I>shear</I> keyword, the wall moves continuously in the specified
dimension with velocity <I>vshear</I>.  The dimension must be tangential to
walls with a planar <I>wallstyle</I>, e.g. in the <I>y</I> or <I>z</I> directions for
an <I>xplane</I> wall.  For <I>zcylinder</I> walls, a dimension of <I>z</I> means the
cylinder is moving in the z-direction along it's axis.  A dimension of
<I>x</I> or <I>y</I> means the cylinder is spinning around the z-axis, either in
the clockwise direction for <I>vshear</I> > 0 or counter-clockwise for
<I>vshear</I> < 0.  In this case, <I>vshear</I> is the tangential velocity of
the wall at whatever <I>radius</I> has been defined.
</P>
<P><B>Restart, fix_modify, output, run start/stop, minimize info:</B>
</P>
<P>This fix writes the shear friction state of atoms interacting with the
wall to <A HREF = "restart.html">binary restart files</A>, so that a simulation can
continue correctly if granular potentials with shear "history" effects
are being used.  See the <A HREF = "read_restart.html">read_restart</A> command for
info on how to re-specify a fix in an input script that reads a
restart file, so that the operation of the fix continues in an
uninterrupted fashion.
</P>
<P>None of the <A HREF = "fix_modify.html">fix_modify</A> options are relevant to this
fix.  No global or per-atom quantities are stored by this fix for
access by various <A HREF = "Section_howto.html#howto_15">output commands</A>.  No
parameter of this fix can be used with the <I>start/stop</I> keywords of
the <A HREF = "run.html">run</A> command.  This fix is not invoked during <A HREF = "minimize.html">energy
minimization</A>.
</P>
<P><B>Restrictions:</B>
</P>
<P>This fix is part of the GRANULAR package.  It is only enabled if
LAMMPS was built with that package.  See the <A HREF = "Section_start.html#start_3">Making
LAMMPS</A> section for more info.
</P>
<P>Any dimension (xyz) that has a granular wall must be non-periodic.
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "fix_move.html">fix_move</A>, <A HREF = "pair_gran.html">pair_style granular</A>
</P>
<P><B>Default:</B> none
</P>
</HTML>
